﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SLIC.Models.EntityModel.Job>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Job Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        /// <summary>
        /// 
        ///  <title>SLIC</title>
        ///  <description>View Job Details page for a particular job</description>
        ///  <copyRight>Copyright (c) 2011</copyRight>
        ///  <company>IronOne Technologies (Pvt)Ltd</company>
        ///  <createdOn>2011-08-05</createdOn>
        ///  <author></author>
        ///  <modification>
        ///     <modifiedBy></modifiedBy>
        ///      <modifiedDate></modifiedDate>
        ///     <description></description>
        ///  </modification>
        ///
        /// </summary>                                                                                 
    %>
    <% 
        var radioButtonList = new SelectList(new List<ListItem> {
   new ListItem { Text = "Yes", Value="1" }, 
   new ListItem { Text = "No", Value="0"}}, "Value", "Text", "false");

        var ConsistencyList = new SelectList(new List<ListItem> {
   new ListItem { Text = "Yes", Value="1" }, 
   new ListItem { Text = "Pending", Value="0"}}, "Value", "Text", "false");
        var htmlAttributes = new Dictionary<string, object> { 
   { "class", "radioButtonList" },
   { "onclick", "if(eval(this.value)) { $('#tblDate').show('slow'); } else { $('#tblDate').hide('slow'); }" }
};%>
    <% using (Html.BeginForm())
       {
           ModelState err = ViewContext.ViewData.ModelState["err"];
           SLIC.Controllers.GenException result = null;

           if (err != null)
           {
               result = (SLIC.Controllers.GenException)err.Errors.ElementAt(0).Exception;
           }	         
    %>
    <%: Html.ValidationSummary(true)%>
    <div style="float: left; width: 100%">
        <div style="width: 500px; text-align: left; float: left;">
            <h2 style="float: left; clear: none;">
                Job Details of
                <%:Model.JobNo %></h2>
        </div>
        <%-- <div class="buttons" style="float: right; width: 250px; clear: none; margin-top: 15px;
            text-align: right;">
            <input type="submit" onclick="parent.location='<%: Url.Action("GetAllJobs") %>';return false;"
                value="All Jobs" class="button" />
            <input type="submit" onclick="parent.location='<%: Url.Action("ViewImageGallery", "Image", new { JobId=Model.Id }) %>';return false;"
                value="View Photos" class="button" />
        </div>--%>
    </div>
    <%:Html.HiddenFor(model => model.Id)%>
    <div id="accordion">
        <div id="innerContainer" style="clear: both;">
            <fieldset>
                <legend onmouseover="this.style.cursor='pointer'">
                    <%--<img src="../../../Content/images/closed.png" />--%>
                    General Information</legend>
                <%-- <div class="editor-label">
            <%: Html.LabelFor(model => model.Id) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Id) %>
            <%: Html.ValidationMessageFor(model => model.Id) %>
        </div>--%>
                <table border="0" cellspacing="0" cellpadding="0" style="color: #000" class="show">
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Job Number
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.JobNo, new{ @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Vehicle Number
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.VehicleNo, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Name of Caller
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Caller_Name, new {  @readonly=true })%>
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Contact Number
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Caller_ContactNo, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Time Reported
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--   <%: Html.TextBoxFor(model => model.TimeReported,new{Value= String.Format("{0:dd/MM/yyyy hh:mm:ss}", Model.TimeReported)})%>
                        <%:String.Format("{0:dd/MM/yyyy}", Model.TimeReported)%>--%>
                            <%: Html.TextBoxFor(model => model.TimeReported, new { Value = String.Format("{0:dd/MM/yyyy hh:mm:ss tt}", Model.TimeReported), @readonly=true,@class="DatetxtBox" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Original Time Reported
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--                        <%: Html.TextBoxFor(model => model.TimeVisited, String.Format("{0:dd/MM/yyyy}", Model.TimeVisited))%>--%>
                            <%: Html.TextBoxFor(model => model.OriginalTimeReported, new { Value = String.Format("{0:dd/MM/yyyy hh:mm:ss tt}", Model.OriginalTimeReported), @readonly = true, @class = "DatetxtBox" })%>
                        </td>
                    </tr>
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Name of Insured
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Insured_Name, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Contact Number of the Insured
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Insured_ContactNo, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Vehicle Type and Color
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.VehicleDescription, new { @readonly=true })%>
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Date & Time of Accident
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--                 <%: Html.TextBoxFor(model => model.Acc_Time, String.Format("{0:g}", Model.Acc_Time))%>--%>
                            <%: Html.TextBoxFor(model => model.Acc_Time, new { Value = String.Format("{0:dd/MM/yyyy hh:mm:ss tt}", Model.Acc_Time), @readonly=true, @class = "DatetxtBox" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Time Visited
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--                        <%: Html.TextBoxFor(model => model.TimeVisited, String.Format("{0:dd/MM/yyyy}", Model.TimeVisited))%>--%>
                            <%: Html.TextBoxFor(model => model.TimeVisited, new { Value = String.Format("{0:dd/MM/yyyy hh:mm:ss tt}", Model.TimeVisited), @readonly=true, @class = "DatetxtBox" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Location of Accident/ Inspection
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Acc_Location, new { @readonly=true })%>
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
    </div>
    <div id="accordion">
        <div id="innerContainer">
            <fieldset>
                <legend onmouseover="this.style.cursor='pointer'">Policy/Cover Note Information</legend>
                <table border="0" cellspacing="0" cellpadding="0" style="color: #000">
                    <tr class="odd">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Policy/Cover No.
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <%: Html.TextBoxFor(model => model.Policy_CN_No, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Policy/Cover Period
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <%--       <%: Html.TextBoxFor(model => model.Policy_CN_StartDate, String.Format("{0:dd/MM/yyyy}", Model.Policy_CN_StartDate))%>--%>
                            <%: Html.TextBoxFor(model => model.Policy_CN_StartDate, new { Value = String.Format("{0:dd/MM/yyyy}", Model.Policy_CN_StartDate), @readonly=true, @class = "DatetxtBox" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa; text-align: center;">
                            to
                        </td>
                        <td class="colontdsForm">
                            &nbsp;
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--  <%: Html.TextBoxFor(model => model.Policy_CN_EndDate, String.Format("{0:dd/MM/yyyy}", Model.Policy_CN_EndDate))%>--%>
                            <%: Html.TextBoxFor(model => model.Policy_CN_EndDate, new { Value = String.Format("{0:dd/MM/yyyy}", Model.Policy_CN_EndDate), @readonly=true, @class = "DatetxtBox" })%>
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Policy/Cover Serial No.
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Policy_CN_SerialNo, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Cover Issued By
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.CN_IssuedBy, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Reasons for Issuing Cover Note
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.CN_Reasons, new { rows = 4, cols = 25 ,  @readonly=true })%>
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
    </div>
    <div id="accordion">
        <div id="innerContainer">
            <fieldset>
                <legend onmouseover="this.style.cursor='pointer'">Vehicle and Driver Information</legend>
                <table border="0" cellspacing="0" cellpadding="0" style="color: #000">
                    <tr class="odd">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Chassis No.
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <%: Html.TextAreaFor(model => model.ChassyNo, new { rows = 3,  @readonly = true })%>
                            <%--   <%if (!String.IsNullOrEmpty(Model.ChassyNo))
                              {%>
                            <%: Html.TextBoxFor(model => model.ChassyNo, new { @readonly = true })%>
                            <%}
                              else
                              { %>
                            <%: Html.TextBoxFor(model => model.ChassyNo_Reason, new { @readonly = true })%>
                            <%}%>--%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Engine No.
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <%: Html.TextAreaFor(model => model.EngineNo, new { rows = 3, @readonly = true })%>
                            <%--   <%if (!String.IsNullOrEmpty(Model.EngineNo))
                              {%>
                            <%: Html.TextBoxFor(model => model.EngineNo, new { @readonly = true })%>
                            <%}
                              else
                              { %>
                            <%: Html.TextBoxFor(model => model.EngineNo_Reason, new { @readonly = true })%>
                            <%}%>--%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Meter Reading
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.MeterReading, new { @readonly=true })%>
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Driver Name
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.DriverName, new { rows = 3, @readonly = true })%>
                            <%--
                            <%if (!String.IsNullOrEmpty(Model.DriverName))
                              {%>
                            <%: Html.TextBoxFor(model => model.DriverName,new{ @readonly=true })%>
                            <%}
                              else
                              { %>
                            <%: Html.TextBoxFor(model => model.DriverName_Reason,new{ @readonly=true })%>
                            <%}%>--%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            NIC No. of the Driver
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.DriverNIC,new{ @readonly=true })%>
                            <%-- <%if (!String.IsNullOrEmpty(Model.DriverNIC))
                              {%>
                            <%: Html.TextBoxFor(model => model.DriverNIC,new{ @readonly=true })%>
                            <%}
                              else
                              { %>
                            <%: Html.TextBoxFor(model => model.DriverNIC_Reason, new { @readonly = true })%>
                            <%}%>--%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Competence
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <% foreach (var radiobutton in radioButtonList)
                               { %>
                            <%=Html.RadioButtonFor(model => model.DriverCompetence, radiobutton.Value,  new{ disabled="true" })%>
                            <label>
                                <%=radiobutton.Text%></label>
                            <% }%>
                            <%--  <%if (Model.DriverCompetence != null)
                              { %>
                            <% foreach (var radiobutton in radioButtonList)
                               { %>
                            <%=Html.RadioButtonFor(model => model.DriverCompetence, radiobutton.Value,  new{ disabled="true" })%>
                            <label>
                                <%=radiobutton.Text%></label>
                            <% }
                              }
                              else
                              { %>
                            <%: Html.TextBoxFor(model => model.DriverCompetence_Reason, new { @readonly = true })%>
                            <%} %>--%>
                        </td>
                    </tr>
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Driving License No.
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.License_No, new { rows = 3, @readonly = true })%>
                            <%--       <%if (!String.IsNullOrEmpty(Model.License_No))
                              {%>
                            <%: Html.TextBoxFor(model => model.License_No, new { @readonly=true })%>
                            <%}
                              else
                              { %>
                            <%: Html.TextBoxFor(model => model.License_No_Reason, new { @readonly = true })%>
                            <%}%>--%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Expiry Date of License
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.License_ExpiryDate, new { Value = String.Format("{0:dd/MM/yyyy}", Model.License_ExpiryDate), @readonly=true, @class = "DatetxtBox" })%>
                            <%-- <%if (Model.License_ExpiryDate != null)
                              {%>
                            <%: Html.TextBoxFor(model => model.License_ExpiryDate, new { Value = String.Format("{0:dd/MM/yyyy}", Model.License_ExpiryDate), @readonly=true, @class = "DatetxtBox" })%>
                            <%}
                              else
                              { %>
                            <%: Html.TextBoxFor(model => model.License_ExpiryDate_Reason, new { @readonly = true })%>
                            <%}%>--%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Type of D/L
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--    <%: Html.TextBox("txtLicenseType", (Model.License_TypeId != null) ? Enum.GetName(typeof(SLIC.Models.Enums.LicenseType), Model.License_TypeId) : Model.License_TypeId_Reason, new { @readonly = true })%>--%>
                            <%: Html.TextBox("txtLicenseType",(Model.License_TypeId!=null)? Enum.GetName(typeof(SLIC.Models.Enums.LicenseType), Model.License_TypeId):string.Empty, new{ @readonly=true })%>
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            New/ Old License Type
                            <%-- <%: Html.LabelFor(model => model.License_IsNew)%>--%>
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%= Html.RadioButtonFor(model => model.License_IsNew, true, new { disabled = "true" })%>
                            New
                            <%= Html.RadioButtonFor(model => model.License_IsNew, false, new { disabled = "true" })%>
                            Old
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Vehicle Class
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;" colspan="4">
                            <%
           if (ViewData["SelectedClasses"] != null)
           {
               foreach (var item in (List<SelectListItem>)ViewData["SelectedClasses"])
               {
                            %>
                            <%:Html.CheckBox("chk",item.Selected, new{ disabled = "true" }) %>
                            <label>
                                <%:item.Text %></label>
                            <% }
           } %>
                        </td>
                    </tr>
                    <%--     <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Vehicle Class Reason
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.VehicleClass_Reason, new { rows = 3, cols = 16, @readonly = true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            &nbsp;
                        </td>
                        <td class="colontdsForm">
                            &nbsp;
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            &nbsp;
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            &nbsp;
                        </td>
                        <td class="colontdsForm">
                            &nbsp;
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            &nbsp;
                        </td>
                    </tr>--%>
                </table>
            </fieldset>
        </div>
    </div>
    <div id="accordion">
        <div id="innerContainer">
            <fieldset>
                <legend onmouseover="this.style.cursor='pointer'">Damages and Vehicle Condition</legend>
                <table border="0" cellspacing="0" cellpadding="0" style="color: #000">
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;" colspan="9">
                            <b>Tyre Condition</b>
                        </td>
                    </tr>
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            F/R
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%:Html.DropDownListFor(model => model.Tyre_FR_Status_Enum, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.TyreConditon))), new {disabled = "true" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            F/L
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%:Html.DropDownListFor(model => model.Tyre_FL_Status_Enum, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.TyreConditon))), new { disabled = "true" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            R/R/L
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%:Html.DropDownListFor(model => model.Tyre_RRL_Status_Enum, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.TyreConditon))), new { disabled = "true" })%>
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            R/L/R
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%:Html.DropDownListFor(model => model.Tyre_RLR_Status_Enum, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.TyreConditon))), new { disabled = "true" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            R/L/L
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%:Html.DropDownListFor(model => model.Tyre_RLL_Status_Enum, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.TyreConditon))), new { disabled = "true" })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            R/R/R
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%:Html.DropDownListFor(model => model.Tyre_RRR_Status_Enum, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.TyreConditon))), new { disabled = "true" })%>
                        </td>
                    </tr>
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Are They Contributory
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%= Html.RadioButtonFor(model => model.Tyre_IsContributory, true, new{ disabled="true" })%>
                            Yes
                            <%= Html.RadioButtonFor(model => model.Tyre_IsContributory, false, new { disabled = "true" })%>
                            No
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Type of Goods Carried
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.Goods_Type, new { rows = 4, cols = 20,   @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Weight of Goods Carried
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--      <%: Html.TextBoxFor(model => model.Goods_Weight, String.Format("{0:F}", Model.Goods_Weight))%>--%>
                            <%: Html.TextBoxFor(model => model.Goods_Weight,  new { @readonly=true })%>
                            Kg
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Damages to the Goods
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.Goods_Damage, new { rows = 4, cols = 20 ,  @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Over Loaded
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%= Html.RadioButtonFor(model => model.IsOverLoaded, true, new { disabled = "true" })%>
                            Yes
                            <%= Html.RadioButtonFor(model => model.IsOverLoaded, false, new { disabled = "true" })%>
                            No
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Is Over Weight Contributory
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%= Html.RadioButtonFor(model => model.Is_OL_Contributory, true, new { disabled = "true" })%>
                            Yes
                            <%= Html.RadioButtonFor(model => model.Is_OL_Contributory, false, new { disabled = "true" })%>
                            No
                        </td>
                    </tr>
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Other Vehicles involved
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.OtherVeh_Involved, new { rows = 4, cols = 20, @readonly=true  })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Third Party Damages Property
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.ThirdParty_Damage, new { rows = 5, cols = 20 , @readonly=true})%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Injuries (Insured + 3rd Party)
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextAreaFor(model => model.Injuries, new { rows = 4, cols = 20 ,  @readonly=true })%>
                        </td>
                    </tr>
                    <tr class="even">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Damaged Items
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" colspan="4">
                            <%--    <input id="btnDamagedItem" type="button" value="View items" onclick='javascript:alert("This feature is currently disabled!")'
                                class="button" />--%>
                            <table border="1">
                                <%if (Model.DamagedItemsList != null)
                                  {
                                      foreach (string[] itemArray in Model.DamagedItemsList)
                                      {
                                %>
                                <tr>
                                    <%foreach (string item in itemArray)
                                      {
                                    %>
                                    <td style="border: 0.5px solid #aaa;">
                                        &nbsp;
                                        <%:Html.Encode(item)%>
                                    </td>
                                    <% } %>
                                </tr>
                                <%}
                                  }%>
                            </table>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Other Damaged Items
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <table border="1">
                                <%: Html.TextAreaFor(model => model.DamagedItems_Other, new { rows = 4, cols = 20 ,  @readonly=true })%>
                            </table>
                        </td>
                    </tr>
                    <tr class="odd">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Pre Accident Damages
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" colspan="4">
                            <table border="1">
                                <%if (Model.PreAccDamagesItemsList != null)
                                  {
                                      foreach (string[] itemArray in Model.PreAccDamagesItemsList)
                                      {
                                %>
                                <tr>
                                    <%foreach (string item in itemArray)
                                      {
                                    %>
                                    <td style="border: 0.5px solid #aaa;">
                                        &nbsp;
                                        <%:Html.Encode(item)%>
                                    </td>
                                    <% } %>
                                </tr>
                                <%}
                                  }%>
                            </table>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Other Pre Accident Damages
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <%: Html.TextAreaFor(model => model.PreAccidentDamages_Other, new { rows = 4, cols = 20 ,  @readonly=true })%>
                        </td>
                    </tr>
                    <tr class="even">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Possible D/R
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <table border="1">
                                <%if (Model.PossibleDRList != null)
                                  {
                                      foreach (string item in Model.PossibleDRList)
                                      {
                                %>
                                <tr>
                                    <td>
                                        &nbsp;
                                        <%:item%>
                                    </td>
                                </tr>
                                <%}
                                  } %>
                            </table>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Other Possible D/R
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            <%: Html.TextAreaFor(model => model.PossibleDR_Other, new { rows = 4, cols = 20 ,  @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            &nbsp;
                        </td>
                        <td class="colontdsForm">
                            &nbsp;
                        </td>
                        <td class="normaltdsForm txtErrorSmall">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
    </div>
    <div id="accordion">
        <div id="innerContainer">
            <fieldset>
                <legend onmouseover="this.style.cursor='pointer'">Other Information</legend>
                <table border="0" cellspacing="0" cellpadding="0" style="color: #000">
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Nearest Police Station
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Nearest_PoliceStation, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Purpose of Journey
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--   <%:Html.DropDownListFor(model => model.Journey_Purpose, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.JourneyPurpose))), new{ disabled="true" })%>--%>
                            <%: Html.TextBox("txtJourneyPurpose", Model.Journey_Purpose != null ? SLIC.Models.Enums.Settings.GetEnumDescription((SLIC.Models.Enums.JourneyPurpose)Model.Journey_Purpose) : string.Empty, new { @readonly = true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Relationship between Driver & Insured
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%--                            <%:Html.DropDownListFor(model => model.DriverRelationshipEnum, new SelectList(Enum.GetValues(typeof(SLIC.Models.Enums.RelationshipType))), new { disabled = "true" })%>--%>
                            <%: Html.TextBox("txtDriverRelation", Model.DriverRelationshipEnum != null ? SLIC.Models.Enums.Settings.GetEnumDescription((SLIC.Models.Enums.RelationshipType)Model.DriverRelationshipEnum) : string.Empty, new { @readonly = true })%>
                        </td>
                    </tr>
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Pav Value <font style="font-size: 12px">(Rs.)</font>
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.PavValue, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Claim Processing Branch
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.ProcessingBranch, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Consistency by CSR
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <% foreach (var radiobutton in ConsistencyList)
                               { %>
                            <%=Html.RadioButtonFor(model => model.CSR_Consistency, radiobutton.Value,  new{ disabled="true" })%>
                            <label>
                                <%=radiobutton.Text%></label><br />
                            <% } %>
                        </td>
                    </tr>
                    <tr class="even" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Name of CSR
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.CSR_UserName, new { @readonly=true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Comment
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;" colspan="4">
                            <%: Html.TextAreaFor(model => model.Comment, new { rows = 4, cols = 60 ,  @readonly=true })%>
                        </td>
                        <%--
                    <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                    </td>
                    <td class="colontdsForm">
                    </td>
                    <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                    </td>--%>
                    </tr>
                    <tr class="odd" style="border: solid 1px #aaa;">
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            On Site Estimation
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBox("txtSite", Model.SiteEstimation != null ? SLIC.Models.Enums.Settings.GetEnumDescription((SLIC.Models.Enums.OnSiteEstimation)Model.SiteEstimation) : string.Empty, new { @readonly = true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                            Approximate Cost of Repair <font style="font-size: 12px">(Rs.)</font>
                        </td>
                        <td class="colontdsForm">
                            :
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                            <%: Html.TextBoxFor(model => model.Approx_RepairCost, new { @readonly = true })%>
                        </td>
                        <td class="normaltdsForm" style="border-top: solid 1px #aaa;">
                        </td>
                        <td class="colontdsForm">
                        </td>
                        <td class="normaltdsForm txtErrorSmall" style="border-top: solid 1px #aaa;">
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
    </div>
    <%-- <p>
        <input type="submit" value="Save" />
    </p>--%>
    <% } %>
    <br />
    <div class="buttons" style="float: right;">
        <input type="submit" onclick="showPopup('<%: Url.Action("PrintJob", "Job", new { JobId=Model.Id }) %>');return (false);"
            value="Print" class="button" />
        <input type="submit" onclick="parent.location='<%: Url.Action("ViewImageGallery", "Image", new { JobId=Model.Id }) %>';return false;"
            value="View Photos" class="button" />
        <input type="submit" onclick="parent.location='<%: Url.Action("GetReSubmissions", "Job", new { jobId=Model.Id }) %>';return false;"
            value="Visits" class="button" />
        <input type="submit" onclick="parent.location='<%: Url.Action("GetAllJobs") %>';return false;"
            value="All Jobs" class="button" />
    </div>
    <%-- <div>
        <%: Html.ActionLink("All Jobs","GetAllJobs") %>
    </div>
    <div>
        <%: Html.ActionLink("View Photos", "ViewImageGallery","Image", new { JobId=Model.Id },null)%>
    </div>--%>
    <script type="text/javascript">
        function initAccordion() {
            $('#accordion #innerContainer fieldset table').hide();
            $('#accordion #innerContainer fieldset table.show').show();
            $('#accordion #innerContainer fieldset table table').show();
            //because possible d/r, damaged items, pre-acc damages getting hide because of the first hide() script
            $('#accordion #innerContainer fieldset legend').click(
    function () {
        $(this).next().slideToggle('slow');
    }
    );
        }
        $(document).ready(function () { initAccordion(); });


        function showPopup(url) {
            newwindow = window.open(url, 'name', 'scrollbars=1,height=490,width=1000,top=100,left=30,resizable,location=no');
            if (window.focus) { newwindow.focus() }
        }
           
   
    </script>
</asp:Content>
